package com.woniu.entity.dto;

import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class CategoryDTO {
        private Integer id;
        private Integer pid;
        private String title;
        private String description;
        private Long count;
        private LocalDateTime createTime;
        private LocalDateTime updateTime;
        private String creater;
        private String updater;
        private List<CategoryDTO> children;

    public CategoryDTO() {
    }

    public CategoryDTO(Integer id, Integer pid,
                       String title, String description,
                       Long count, LocalDateTime createTime,
                       LocalDateTime updateTime,
                       String creater, String updater, List<CategoryDTO> children) {
        this.id = id;
        this.pid = pid;
        this.title = title;
        this.description = description;
        this.count = count;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.creater = creater;
        this.updater = updater;
        this.children = children;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }

    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }

    public List<CategoryDTO> getChildren() {
        return children;
    }

    public void setChildren(List<CategoryDTO> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "CategoryDTO{" +
                "id=" + id +
                ", pid=" + pid +
                ", title='" + title + '\'' +
                ", description='" + description + '\'' +
                ", count=" + count +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", creater='" + creater + '\'' +
                ", updater='" + updater + '\'' +
                ", children=" + children +
                '}';
    }
}
